package com.voute.Model.Impl;

import android.text.TextUtils;

import com.voute.Api.PersonalFeedService;
import com.voute.Model.Bean.PersonalFeedBean;
import com.voute.Model.IPersonalFeedModel;
import com.voute.Utils.ServiceFactory;

import rx.Observable;

/**
 * 个人中心页面中我的收藏 我的创建 我的参与对应的model
 * 接口实现类
 * Created by liucxu on 2017/1/20.
 */

public class PersonalFeedModelImpl implements IPersonalFeedModel {
    @Override
    public Observable<PersonalFeedBean> getPersonalFeed(String type, String anchor, String userId) {
        if (TextUtils.isEmpty(userId)) {
            return ServiceFactory.GetInstance().createService(PersonalFeedService.class).getPersonalFeed(type, anchor);
        } else {
            return ServiceFactory.GetInstance().createService(PersonalFeedService.class).getOtherUserFeed(type,userId,anchor);
        }
    }
}
